label var SAMPLE "\$In \ Sample\$"

eststo clear
local VAR ln_wage PAY_PIECE_RATE  PAY_QUALITY_BONUS  PAY_OTHER_BONUS   
foreach v of local VAR{
eststo: reg `v' SAMPLE, vce(cluster FE_factory)	 
  quietly estadd local est ="OLS", replace  
  quietly estadd local FE ="s,r(i)", replace  
  quietly estadd local CTRL2 ="Yes", replace    
  quietly estadd scalar  U =  . , replace   
}  
esttab using "${tables}\TableB4PanelA.tex", ///
  title("Observations with and without buyer characteristics" \label{LaborBalance}) ///
  label replace booktabs b(3) se(3) noconstant obslast substitute(\_ _) ///
  drop() order() /// 
  stats(FE   r2   N   , fmt( %~#s   2 %12.0fc  )  ///
  labels("FEs"  `"\(R^{2}\)"'  "Obs."  ))   ///
  star(* 0.10 ** 0.05 *** 0.01) ///
  nonotes  
  
eststo clear
local VAR GENDER EXP_GARMENT_MONTHS secondary_plus markraven   
foreach v of local VAR{
eststo: reg `v' SAMPLE, vce(cluster FE_factory)	 
  quietly estadd local est ="OLS", replace  
  quietly estadd local FE ="s,r(i)", replace  
  quietly estadd local CTRL2 ="Yes", replace    
  quietly estadd scalar  U =  . , replace   
}  
esttab using "${tables}\TableB4PanelB.tex", ///
  title("Observations with and without buyer characteristics" \label{LaborBalance}) ///
  label replace booktabs b(3) se(3) noconstant obslast substitute(\_ _) ///
  drop() order() /// 
  stats(FE   r2   N   , fmt( %~#s   2 %12.0fc  )  ///
  labels("FEs"  `"\(R^{2}\)"'  "Obs."  ))   ///
  star(* 0.10 ** 0.05 *** 0.01) ///
  nonotes  
  